import Home from '../Page/Home'
import Detail from '../Page/Detail'
import List from '../Page/List'
import { createBrowserRouter } from 'react-router-dom'

export const router= createBrowserRouter([
    {
        path:'/',
        lazy:async()=>{
            const {default:Home}=await import('../Page/Home')
            return {element:<Home/>}
        }
    },
    {
        path: "/detail/:id",
        element: <Detail />,
      },
    {
        path:'/list',
        lazy:async()=>{
            const {default:List}=await import('../Page/List')
            return {element:<List/>}
        }
    }
])